#pragma
#include <iostream>

void outOfMem()
{
	std::cerr<< "Unable to satisfy request for memory" << std::endl;
	std::abort();
}

void testAllocFail()
{
	std::set_new_handler(outOfMem);
	while(true)
	{
		int* pBigDataArray = new int[10000000L];
	}
}

int main()
{
	testAllocFail();
}